package com.job.client.common.result;

import lombok.Getter;

@Getter
/*枚举类，返回统一的状态码和消息*/
public enum AppHttpCode {
    SUCCESS(200,"成功"),
    FAIL(201, "失败"),

    DATA_NULL(201,"缺少参数"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),

    LOGIN_AUTH(208, "未登陆"),
    TOKEN_ERROR(208,"token已过期或者出错"),
    PERMISSION(209, "没有权限"),
    COMPANY_AUTHENTICATION_FAIL(202,"公司认证未通过"),
    AUTHENTICATION_NO_COMPANY(201,"没有此密钥的公司"),

    PHONE_ERROR(201,"手机号错误"),
    ALY_SMS_ERROR(201,"阿里云发送短信服务错误"),
    SMS_CODE_ERROR(201,"短信验证码错误"),
    SMS_CODE_NULL(201,"短信验证码格式不正确"),
    SMS_TIMEOUT_NOTSEND(201,"未发送验证码或验证码已过期，请重新发送"),
    PHONE_EXIST(201,"手机号已存在，请登录"),
    PHONE_NOT_EXIST(201,"手机号不存在，请注册"),
    USERNAME_NOT_EXIST(201,"用户名不不存在，请注册"),
    PASSWORD_ERROR(201,"密码错误，请重试"),
    USERNAME_PASSWORD_ERROR(201,"员工号或密码错误，请重新输入"),
    MONGODB_DATA_NULL(201,"没有该用户的数据"),
    WEBSOCKER_ERROR(201,"webSocker发送消息到客户端失败"),
    USERNUMBER_EXIST(201," 员工工号已经存在"),

    MINIO_UPLOAD_FAIL(201,"minio上传文件失败"),
    AVATAR_FAIL(201,"头像操作失败"),

    URL_ENCODE_ERROR( 216, "URL编码失败"),
    ILLEGAL_CALLBACK_REQUEST_ERROR( 217, "非法回调请求"),
    FETCH_ACCESSTOKEN_FAILD( 218, "获取accessToken失败"),
    FETCH_USERINFO_ERROR( 219, "获取用户信息失败"),

    IMG_CODE_ERROR(201,"图形验证码生成错误")
    ;

    private Integer code;
    private String msg;

    AppHttpCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
